package de.derhess.projects.pkr.models
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	
	import mx.events.PropertyChangeEvent;
	
	
	/**
	 * released under MIT License (X11)
	 * http://www.opensource.org/licenses/mit-license.php
	 * 
	 * Class  LawyerInstanceCost
	 * 
	 * @author Florian Weil [derhess.de, Deutschland]
	 * @see http://blog.derhess.de
	 */
	[Bindable]
	public class LawyerInstanceCost extends EventDispatcher
	{
		//--------------------------------------------------------------------------
		//
		//  Class variables
		//
		//--------------------------------------------------------------------------
		
		//--------------------------------------------------------------------------
		//
		//  Variables
		//
		//--------------------------------------------------------------------------
		
		//--------------------------------------------------------------------------
		//
		//  Initialization
		//
		//--------------------------------------------------------------------------
		public function LawyerInstanceCost()
		{
			litigationFee = new FactorSum(0,0);
			riseFee = new FactorSum(0,0);
			imputeSum = new StandardSum(0);
			appointmentFee = new FactorSum(0,0);
			conciliationFee = new FactorSum(0,0);
			expenses = new StandardSum(0);
			otherCost = new StandardSum(0);
			vat = new PercentageSum(19,0);
		}

		//--------------------------------------------------------------------------
		//
		//  Properties
		//
		//--------------------------------------------------------------------------
		public var litigationFee:FactorSum; // Verfahrensgebühr
		public var imputeSum:StandardSum; // anrechbarer Teil
		public var riseFee:FactorSum; // Erhöhungsgebühr
		public var appointmentFee:FactorSum; // Terminsgebühr
		public var conciliationFee:FactorSum; // Einigungsgebühr
		public var expenses:StandardSum; // Auslagen
		public var otherCost:StandardSum; // sonstige Kosten
		public var vat:PercentageSum; // Mehrwertsteuer
		
		public var sum:Number = 0;
		
		//--------------------------------------------------------------------------
		//
		//  Additional getters and setters
		//
		//--------------------------------------------------------------------------
		
		
		
		//--------------------------------------------------------------------------
		//
		//  Methods
		//
		//--------------------------------------------------------------------------
		public override function toString():String 
		{
			return "[LawyerInstanceCost] :  litigationFee: " + litigationFee.toString() + "+ riseFee: " +riseFee.toString() + "+ imputeSum: " + imputeSum.toString() + "+ appointmentFee: " + appointmentFee.toString() + "+ conciliationFee: " + conciliationFee.toString() + "+ expenses: " + expenses.toString() + "+ otherCost: " + otherCost.toString() + "+ vat: " + vat.toString() + " = sum: " + sum;	
		}
		//--------------------------------------------------------------------------
		//
		//  API
		//
		//--------------------------------------------------------------------------
		
		
		
		//--------------------------------------------------------------------------
		//
		//  Eventhandling
		//
		//--------------------------------------------------------------------------
		
		//--------------------------------------------------------------------------
		//
		//  Broadcasting
		//
		//--------------------------------------------------------------------------
		
		
	}
}